<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div>
    <nav aria-label="Page navigation">
        <ul class="pagination">

            <li>
                <a href="${pageContext.request.contextPath}/userServlet?method=pageQuery&currentPage=1&pageSize=${page.pageSize}&name=${queryUser.name}&address=${queryUser.address}&email=${queryUser.email}" aria-label="Previous">
                    <span aria-hidden="true">首页</span>
                </a>
            </li>
            <li>
                <a href="${pageContext.request.contextPath}/userServlet?method=pageQuery&currentPage=${page.pageNum - 1}&pageSize=${page.pageSize}&name=${queryUser.name}&address=${queryUser.address}&email=${queryUser.email}" aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>

            <%--遍历分页--%>
            <c:forEach begin="${page.navigateFirstPage}" end="${page.navigateLastPage}" var="i">
                <li ${page.pageNum == i ? "class='active'" : ""}><a href="${pageContext.request.contextPath}/userServlet?method=pageQuery&currentPage=${i}&pageSize=${page.pageSize}&name=${queryUser.name}&address=${queryUser.address}&email=${queryUser.email}">${i}</a></li>
            </c:forEach>

            <li>
                <a href="${pageContext.request.contextPath}/userServlet?method=pageQuery&currentPage=${page.pageNum + 1}&pageSize=${page.pageSize}&name=${queryUser.name}&address=${queryUser.address}&email=${queryUser.email}" aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
            <li>
                <a href="${pageContext.request.contextPath}/userServlet?method=pageQuery&currentPage=${page.pages}&pageSize=${page.pageSize}&name=${queryUser.name}&address=${queryUser.address}&email=${queryUser.email}" aria-label="Previous">
                    <span aria-hidden="true">尾页</span>
                </a>
            </li>
            <span style="font-size: 25px;margin-left: 5px;">
                    共${page.total}条记录，共${page.pages}页
                </span>

        </ul>
    </nav>


</div>